using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace UltimateDefend
{
    public partial class HScoresFrm : Form
    {
        bool m_bIsBack = false;
        public HScoresFrm()
        {
            InitializeComponent();
        }

        protected override void OnPaint(PaintEventArgs e)
        {
            Image i = Properties.Resources.HScoresScreen;
            e.Graphics.DrawImage(i, new Rectangle(0, 0, this.Width, this.Height),
                                    new Rectangle(0, 0, i.Width, i.Height),
                                    GraphicsUnit.Pixel);
            e.Graphics.Dispose();
        }

        protected override void OnPaintBackground(PaintEventArgs e)
        {
            if (!this.m_bIsBack)
            {
                this.m_bIsBack = true;
            }
        }

        private void btnBack_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void HScoresFrm_Load(object sender, EventArgs e)
        {
            this.Invalidate();
        }

        static public void LoadScores(System.Xml.XmlTextReader scores)
        {
            scores.ReadToFollowing("scores");
        }
    }
}